<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_productCarousel.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Mall_productCarousel.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '产品轮播图配置',
        name: 'Mall_productCarousel',
        url: '/productCarousel/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        productID: '',
        carousel_name: '',
        imageAddress: [],
        isAvailable: '',
        startingTime: '',
        modifyDate: '',
        createDate: '',
        modifyID: '',
        createID: '',
        modifier: '',
        creator: '',
      },
      editFormOptions: [
        [
          { title: '轮播图名称', field: 'carousel_name', type: 'select' },
          { title: '轮播图编码', field: 'productID', type: 'select', dataKey: 'mall_product', hidden: true },
          { title: '是否可用', required: true, field: 'isAvailable', type: 'switch', dataKey: 'enable' },
        ],
        [{ title: '轮播图', field: 'imageAddress', type: 'imgupgrade', multiple: true, maxFile: 3 }],
      ],
      searchFormFields: { productID: '', isAvailable: '', creator: '', createDate: '', modifyDate: '' },
      searchFormOptions: [
        [
          { title: '产品', field: 'carousel_name', type: 'select', dataKey: 'mall_product' },
          { title: '是否可用', field: 'isAvailable', type: 'select', dataKey: 'enable' },
        ],
        [{ title: '创建时间', field: 'createDate', type: 'datetime' }],
      ],
      columns: [
        { field: 'id', title: '产品轮播', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
        //{field:'productID',title:'轮播图编码',bind: { key: 'mall_product', data: [] },type:'string',width:120,align:'left'},
        { field: 'carousel_name', title: '名称', type: 'string', width: 120, align: 'left' },
        { field: 'imageAddress', title: '轮播图', type: 'imgupgrade', width: 50, align: 'left' },
        { field: 'isAvailable', title: '是否可用', bind: { key: 'enable', data: [] }, type: 'sbyte', width: 90, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        //{field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
        { field: 'creator', title: '创建人', type: 'string', width: 130, align: 'left' },
        { field: 'modifier', title: '修改人', type: 'string', width: 130, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        // {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
        // {field:'spare1',title:'扩展字段1',type:'string',width:220,align:'left'},
        // {field:'spare2',title:'扩展字段1',type:'string',width:220,align:'left'},
        // {field:'spare3',title:'扩展字段1',type:'string',width:220,align:'left'},
        // {field:'spare4',title:'扩展字段1',type:'string',width:220,align:'left'},
        // {field:'spare5',title:'扩展字段1',type:'string',width:220,align:'left'},
        // {field:'spare6',title:'扩展字段1',type:'string',width:220,align:'left'}
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
